#!/bin/sh
cd ${0%/*} || exit 1    # Run from this directory

# Source OpenFOAM functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

application=$(getApplication)
numProcessors=$(getNumberOfProcessors)

rm -rf postPro* 2>&1
blockMesh > log.blockMesh 2>&1
setFields > log.setFields 2>&1
decomposePar -force > log.decomposePar 2>&1
mpirun -np $numProcessors --allow-run-as-root $application -parallel > log.mpirun 2>&1
